#pragma once


#include <memory>
#include <string>

#include "Status.h"

namespace streamdb {

class Producer {
public:
    virtual ~Producer(){}
    
    virtual Status open() = 0;
    virtual Status append(const std::string & object) = 0;

    virtual void close() = 0;

    virtual const std::string & getDirectory() const = 0;
    virtual const std::string & getTopic() const = 0;

};

std::shared_ptr<Producer> makeProducer(const std::string & path, const std::string & topic);

} //end of namespace streamdb
